﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;

namespace Pawn
{
    public partial class FrmInDSPhieu : Form
    {
        public DataSet.PhieuVayDataTable dt { get; set; }
        public String TenPhieu { get; set; }
        public DateTime TuNgay { get; set; }
        public DateTime DenNgay { get; set; }
        public DateTime NgayThongKe { get; set; }
        public FrmInDSPhieu()
        {
            InitializeComponent();
        }

        private void FrmInDSPhieu_Load(object sender, EventArgs e)
        {
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("TenBC", TenPhieu));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("TuNgay", TuNgay.ToString("dd/MM/yyyy")));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("DenNgay", DenNgay.ToString("dd/MM/yyyy")));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("NgayThongKe", String.Format("Ngày {0} tháng {1} năm {2}", NgayThongKe.Day, NgayThongKe.Month, NgayThongKe.Year)));
            this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsDSPhieu", (DataTable)dt));
            this.reportViewer1.RefreshReport();
        }
    }
}
